<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ attribute name="actionUrl" required="true" %>
<a href="javascript:void(0)" onclick="submit()"
   class="btn btn-success">保存</a>

<script>
    function submit() {
        var data = $('#form').serialize();
        $.post('${actionUrl}', data, function (rs) {
            debugger;
            if (rs == "") {
                location.href = document.referrer;
            } else {
                alert(rs);
            }
        })
    }
</script>